package com.chapter13;

import java.util.Comparator;
import java.util.Map.Entry;

public class EntrySetComparator<T> implements
		Comparator<Entry<String, Integer>> {

	@Override
	public int compare(Entry<String, Integer> arg0, Entry<String, Integer> arg1) {
		if(arg0.getValue()>arg1.getValue())
			return -1;
		else if(arg0.getValue()<arg1.getValue())
			return 1;
		return 0;
	}

}
